package lesson.ch5;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MainApp1 {
	private static ApplicationContext context;

	public static void main(String[] args) {
		String packageName = MainApp1.class.getPackage().getName().replaceAll("\\.","\\\\") ;
		System.out.println(packageName);
		context = new ClassPathXmlApplicationContext(packageName + "\\Bean.xml");
		HelloWorld h = (HelloWorld) context.getBean("helloWorld") ;
		System.out.print(h.getMessage());
	}

}
